Optimal. Leaf size=72 \[ \frac {1}{8} x \left (8 a^2+8 a b+3 b^2\right )-\frac {b (8 a+3 b) \sin (e+f x) \cos (e+f x)}{8 f}-\frac {b^2 \sin ^3(e+f x) \cos (e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3179} \[ \frac {1}{8} x \left (8 a^2+8 a b+3 b^2\right )-\frac {b (8 a+3 b) \sin (e+f x) \cos (e+f x)}{8 f}-\frac {b^2 \sin ^3(e+f x) \cos (e+f x)}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3179
Rubi steps
\begin {align*} \int \left (a+b \sin ^2(e+f x)\right )^2 \, dx &=\frac {1}{8} \left (8 a^2+8 a b+3 b^2\right ) x-\frac {b (8 a+3 b) \cos (e+f x) \sin (e+f x)}{8 f}-\frac {b^2 \cos (e+f x) \sin ^3(e+f x)}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 58, normalized size = 0.81 \[ \frac {4 \left (8 a^2+8 a b+3 b^2\right ) (e+f x)-8 b (2 a+b) \sin (2 (e+f x))+b^2 \sin (4 (e+f x))}{32 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 63, normalized size = 0.88 \[ \frac {{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} f x + {\left (2 \, b^{2} \cos \left (f x + e\right )^{3} - {\left (8 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 60, normalized size = 0.83 \[ \frac {1}{8} \, {\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} x + \frac {b^{2} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {{\left (2 \, a b + b^{2}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.35, size = 78, normalized size = 1.08 \[ \frac {b^{2} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+2 a b \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+a^{2} \left (f x +e \right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 68, normalized size = 0.94 \[ a^{2} x + \frac {{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a b}{2 \, f} + \frac {{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{2}}{32 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 14.49, size = 77, normalized size = 1.07 \[ x\,\left (a^2+a\,b+\frac {3\,b^2}{8}\right )-\frac {\left (\frac {5\,b^2}{8}+a\,b\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {3\,b^2}{8}+a\,b\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+2\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.34, size = 168, normalized size = 2.33 \[ \begin {cases} a^{2} x + a b x \sin ^{2}{\left (e + f x \right )} + a b x \cos ^{2}{\left (e + f x \right )} - \frac {a b \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {3 b^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin ^{2}{\relax (e )}\right )^{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________